export const addSelect = (editor) => {
    const {
        Components
    } = editor;
    Components.addType('select', {
        model: {
            defaults: {
                name: 'select',
                droppable: false,
                attributes:{'data-gjs-type':'select'},
                components: [{
                    type: 'div',
                    attributes: {
                        class: ''
                    },
                    components: [{
                        type: 'text',
                        content: '<select id="news" style="width: 200px;" maxOptionsText="4">\
  <option value="1">栏目名称</option>\
  <option value="2" >————————————</option>\
  <option value="3">1文章标题(这里输出的是文章标题)</option>\
  <option value="4">2文章标题(这里输出的是文章标题)</option>\
  <option value="5">3文章标题(这里输出的是文章标题)</option>\
  <option value="6">4文章标题(这里输出的是文章标题)</option>\
  <option value="7">5文章标题(这里输出的是文章标题)</option>\
  <option value="8">6文章标题(这里输出的是文章标题)</option>\
</select>'
                    },

                    ]
                }],
                script() {
                    
                },
                styles: `
               
                `,
            },
            
        },
    });

    // 注册 customCheckbox 组件
    editor.BlockManager.add('select', {
        label: '下拉框',
        category: '其他类',
        media: '<svg t="1720776615133" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="23813" width="30" height="30"><path d="M839.68 445.44H614.4l112.64 122.88z" p-id="23814"></path><path d="M957.44 194.56H81.92c-10.24 0-20.48 10.24-20.48 25.6V742.4c0 10.24 10.24 20.48 25.6 20.48h875.52c10.24 0 25.6-10.24 25.6-20.48V220.16c-5.12-15.36-15.36-25.6-30.72-25.6z m-51.2 471.04c0 10.24-10.24 15.36-20.48 15.36H158.72c-10.24 0-20.48-5.12-20.48-15.36V291.84c0-10.24 10.24-15.36 20.48-15.36h727.04c10.24 0 20.48 5.12 20.48 15.36V665.6z" p-id="23815"></path></svg>',
        content: {
            type: 'select'
        },
    });
};